package com.example.impl;

import com.example.demo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component(value = "asddas")
public class AsyncStudent {

    @Autowired
    private StudentMapper studentMapper;
    @Async
    @Transactional
    public void insert(Student student){
        studentMapper.insert(student);
    }

}
